﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;

namespace Com.Maiyoule.GsmSms {
    public class Setting {
        private int rate = 9600;
        /// <summary>
        /// 波特率
        /// </summary>
        public int Rate {
            get { return rate; }
            set { rate = value; }
        }
        private int bits = 8;
        /// <summary>
        /// 数据位长度
        /// </summary>
        public int Bits {
            get { return bits; }
            set { bits = value; }
        }
        private bool dtrEnabled = true;
        /// <summary>
        /// 是否启用终端数据信号
        /// </summary>
        public bool DtrEnabled {
            get { return dtrEnabled; }
            set { dtrEnabled = value; }
        }

        private string portName = "COM1";

        public string PortName {
            get { return portName; }
            set { portName = value; }
        }
        private int readTimeout = 10000;

        public int ReadTimeout {
            get { return readTimeout; }
            set { readTimeout = value; }
        }

        private bool rtsEnabled = true;

        public bool RtsEnabled {
            get { return rtsEnabled; }
            set { rtsEnabled = value; }
        }

        private StopBits stopBits = StopBits.One;

        public StopBits StopBits {
            get { return stopBits; }
            set { stopBits = value; }
        }
        /// <summary>
        /// 奇偶效验
        /// </summary>
        private Parity parity = Parity.None;

        public Parity Parity {
            get { return parity; }
            set { parity = value; }
        }

        private Handshake handshake = Handshake.None;
        /// <summary>
        /// 握手协议
        /// </summary>
        public Handshake Handshake {
            get { return handshake; }
            set { handshake = value; }
        }



    }
}
